<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for pages/data/dright/index.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../../prettify.css" />
    <link rel="stylesheet" href="../../../base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(../../../sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="../../../index.html">All files</a> / <a href="index.html">pages/data/dright</a> index.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/25</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/8</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/6</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/25</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
	&lt;div class="right-content"&gt;
		&lt;div class="top-box"&gt;
			&lt;databox :title="''" :dheight="440"&gt;
	     	    &lt;databox :title="'新增粉丝'" :dheight="210" :boxb="false"&gt;
	     	    	&lt;follower :data="followers"&gt;&lt;/follower&gt;
	     	    	&lt;nodata :nodata="'一个粉丝'" v-if="noFollowing"&gt;&lt;/nodata&gt;
	     	     &lt;/databox&gt;
	     	     &lt;databox :title="'最近跟随'" :dheight="210" :boxb="false"&gt;
	     	     	&lt;follower :data="following"&gt;&lt;/follower&gt;
	     	     	&lt;nodata :nodata="'一个跟随'" v-if="noFollowing"&gt;&lt;/nodata&gt;
	     	     &lt;/databox&gt;
			&lt;/databox&gt;
			 &lt;div class="messege"&gt;
			 	&lt;databox :title="'最新消息'" :dheight="260" :icon="'account'"&gt;
			 		&lt;message :data="messege"&gt;&lt;/message&gt;
			 		&lt;nodata :nodata="'最新消息'" v-if="noMessege"&gt;&lt;/nodata&gt;
			   &lt;/databox&gt;
			 &lt;/div&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
<span class="cstat-no" title="statement not covered" >import follower from './follower'</span>
<span class="cstat-no" title="statement not covered" >import message from './message'</span>
export default {
  components:{
  	follower,
  	message
  },
  props: {
    username:String
  },
<span class="fstat-no" title="function not covered" >  data(){</span>
<span class="cstat-no" title="statement not covered" >  	return{</span>
  		followers:[],
  		noFollowers:false,
  		following:[],
  		noFollowing:false,
  		messege:[],
  		noMessege:false
  	}
  },
<span class="fstat-no" title="function not covered" >  created(){</span>
  // this.getData(this.username)
  },
  methods:{
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >  	getData(username){</span></span>
<span class="cstat-no" title="statement not covered" >	    	let comUrl = "/api/users/"</span>
<span class="cstat-no" title="statement not covered" >	    	let url1 = comUrl + username + "/followers"</span>
<span class="cstat-no" title="statement not covered" >	    	let url2 = comUrl + username + "/following"</span>
<span class="cstat-no" title="statement not covered" >	    	let url3 = comUrl + username + "/received_events"</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >	    	this.$axios.all([</span></span>
	    		this.$axios.get(url1),
	    		this.$axios.get(url2),
	    		this.$axios.get(url3)
	    	]).then(this.$axios.spread((res1,res2,res3)=&gt;{
	    		//粉丝情况
<span class="cstat-no" title="statement not covered" >	    		let data1 = JSON.parse(JSON.stringify(res1.data))</span>
<span class="cstat-no" title="statement not covered" >	    		if(data1.length&lt;1){</span>
<span class="cstat-no" title="statement not covered" >	    			this.noFollowers = true</span>
	    		}else{
<span class="cstat-no" title="statement not covered" >	    			this.followers = data1.reverse()</span>
	    		}
	    		//跟随情况
<span class="cstat-no" title="statement not covered" >	    		let data2 = JSON.parse(JSON.stringify(res2))</span>
<span class="cstat-no" title="statement not covered" >	    		if(data2.data.length&lt;1){</span>
<span class="cstat-no" title="statement not covered" >	    			this.noFollowing = true</span>
	    		}else{
<span class="cstat-no" title="statement not covered" >	    			this.following = data2.data.reverse()</span>
	    		}
	    		
	    		//最新消息
<span class="cstat-no" title="statement not covered" >	    		let data3 = JSON.parse(JSON.stringify(res3))</span>
<span class="cstat-no" title="statement not covered" >	    		if(data3.data.length&lt;1){</span>
<span class="cstat-no" title="statement not covered" >	    			this.noMessege = true</span>
	    		}else{
<span class="cstat-no" title="statement not covered" >	    			this.messege = data3.data</span>
	    		}
	    		
<span class="cstat-no" title="statement not covered" >	    		return</span>
<span class="fstat-no" title="function not covered" >	    	}))</span>
	    	.catch(err =&gt;{
<span class="cstat-no" title="statement not covered" >			    console.log(err.message);</span>
			})
  	   }
    },
  watch:{
<span class="fstat-no" title="function not covered" >  	 username(username){</span>
<span class="cstat-no" title="statement not covered" >  	 	if(username){</span>
<span class="cstat-no" title="statement not covered" >  	 		 this.getData(username)</span>
  	 	}
  	 }
  }
}
&lt;/script&gt;
&nbsp;
&lt;style lang="scss"&gt;
	.right-content{
		width: 100%;
		height: 100%;
		.top-box{
			padding-bottom: 40px;
			.messege{
				padding-top:20px ;
			}
		}
	}
&lt;/style&gt;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Feb 14 2019 11:04:45 GMT+0800 (CST)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="../../../sorter.js"></script>
</body>
</html>
